const cp = require('child_process');

const child = cp.spawn('yarn', ['start'], {
  detached: true,
  cwd: __dirname,
  shell:true,
  windowsHide:true,
}); 

child.on('close', code => {
  console.log('close', code);
})

child.on('exit', code => {
  console.log('-----exit', code);
})

process.exit(0);